/** 查询参数设置列表 */
export function listConfigApi(query: ConfigRecord): Promise<ApiRowsRecord<ConfigRecord[]>> {
  return request({
    url: `system/config/list`,
    method: 'get',
    params: query
  });
}

/** 查询参数设置详细 */
export function getConfigApi(id: number): Promise<ApiDataRecord<ConfigRecord>> {
  return request({
    url: `system/config/${id}`,
    method: 'get'
  });
}

/** 新增参数设置 */
export function addConfigApi(data: ConfigRecord): Promise<ApiRecord> {
  return request({
    url: "system/config",
    method: 'post',
    data: data
  });
}

/** 修改参数设置 */
export function updateConfigApi(data: ConfigRecord): Promise<ApiRecord> {
  return request({
    url: "system/config",
    method: 'put',
    data: data
  });
}

/** 删除参数设置 */
export function delConfigApi(id: number[]): Promise<ApiRecord> {
  return request({
    url: `system/config/${id}`,
    method: 'delete',
  });
}

// 刷新参数缓存
export function configRefreshCacheApi() {
  return request({
    url: '/system/config/refreshCache',
    method: 'delete'
  })
}